<ion-header>
  <ion-toolbar>
    <div class="signin_title">
      <div class="brand"><img src="../../../../assets/images/android/drawable-mdpi/logo.png" alt=""></div>
      <div class="sign_btn" (click)="signIn()">{{'auth.inputPassword.signIn' | translate}}</div>
    </div>
  </ion-toolbar>
</ion-header>
<div class="login_content">
  <form [formGroup]="validateForm" name="validateForm" role="form" (ngSubmit)="completeSignUp()">
    <ion-grid>
      <ion-row>
        <ion-col>
          <ion-label class="login_title">
            {{'auth.inputPassword.welcome_sign_up' | translate}}
          </ion-label>
        </ion-col>
      </ion-row>
      <ion-row>
        <ion-col>
          <ion-header  class="header_word">
            {{'auth.inputPassword.enter_password_tips' | translate}}
          </ion-header>
        </ion-col>
      </ion-row>
      <ion-row>
        <ion-col class="input-border-bottom">
          <ion-grid>
            <ion-row>
              <ion-col size="12">
                <ion-input type="password" 
                clearInput="true" 
                maxlength=20
                placeholder="{{'auth.inputPassword.password' | translate}}" 
                required 
                autofocus 
                formControlName="password"></ion-input>
              </ion-col>
              <ion-col size="12" *ngIf="password.invalid && (password.dirty || password.touched)">
                <div *ngIf="password.errors.required" class="form-error-item">
                  {{'auth.inputPassword.password_required' | translate}}
                </div>
                <div *ngIf="password.hasError('pattern')" class="form-error-item">
                  {{'auth.inputPassword.password_format_error' | translate}}
                </div>
              </ion-col>
            </ion-row>
          </ion-grid>
        </ion-col>
      </ion-row>
      <ion-row>
        <ion-col>
          <ion-button class="customer-btn" fill="clear" expand="block" type="submit" [disabled]='validateForm.invalid || loading'>
            {{'auth.inputPassword.complete' | translate}}
            <ion-spinner [hidden]="!loading"></ion-spinner>
          </ion-button>
        </ion-col>
      </ion-row>
    </ion-grid>
  </form>
</div>